package org.jeecg.modules.basesource.service.impl;

import org.jeecg.modules.basesource.entity.DjNsrzyxx;
import org.jeecg.modules.basesource.mapper.DjNsrzyxxMapper;
import org.jeecg.modules.basesource.service.IDjNsrzyxxService;
import org.jeecg.modules.dzswj.vo.response.nsrxxcx.Kzxx;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * @Description: 纳税人扩展信息
 * @Author: jeecg-boot
 * @Date:   2022-02-25
 * @Version: V1.0
 */
@Service
public class DjNsrzyxxServiceImpl extends ServiceImpl<DjNsrzyxxMapper, DjNsrzyxx> implements IDjNsrzyxxService {

    @Override
    public boolean saveOrUpdateFromKzxx(String tynsrsbh, Kzxx.Nsrjbxx kzxx) {
        DjNsrzyxx djNsrzyxx = new DjNsrzyxx();
        BeanUtils.copyProperties(kzxx, djNsrzyxx);
        djNsrzyxx.setTynsrsbh(tynsrsbh);
        boolean b = this.saveOrUpdate(djNsrzyxx);
        return b;
    }
}
